from urllib.request import Request,urlopen
from fake_useragent import UserAgent
from urllib.error import URLError
url="http://www.swt.cn/index/login/login111"
headers={
    "User-Agent":UserAgent().chrome
}
try:
    request=Request(url,headers=headers)
    response=urlopen(request)
    info=response.read().decode()
    print(info)
except URLError as e:
    if e.args==():
        print(e.code)
    else:
        print(e.args[0].errno)
    print(e)
print("finished....")